<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>正在拍卖书籍</title>
<script type="text/javascript" src="${staticResources}/js/ajax.js"></script>
<link type="text/css" href="${staticResources}/css/personalcenter.css" rel="stylesheet" />

</head>
<body onload="iframeResizePipe()">

<iframe id="helpframe" src='' height='0' width='0' frameborder='0'></iframe>
<script type="text/javascript">
  function iframeResizePipe()
  {
     // What's the page height?
     var height = document.body.scrollHeight;

     // Going to 'pipe' the data to the parent through the helpframe..
     var pipe = document.getElementById('helpframe');

     // Cachebuster a precaution here to stop browser caching interfering
     pipe.src = '${contextPath}/framehelper.html?height='+height+'&cacheb='+Math.random();
  }
</script>
<div class="con">
	<div class = "sj">
		<div class= "grey2" style="font-weight:600">正在拍卖</div>
		
		<c:forEach var = "bookitem" items="${page.records}">
		<div class = "lists">
			<div class = "list">
			  <c:choose>
			    <c:when test="${empty bookitem.front_end_picpath }">
			      <img src="${staticResources}/image/bepics_none.jpg" style="max-width:73px;max-height:86px" alt="">
			    </c:when>
			    <c:otherwise>
			    <img src="${userContents}/bepics/${bookitem.front_end_picpath}" style="max-width:73px;max-height:86px" alt="">
			    </c:otherwise>
			  </c:choose>
				<a href="#">书名:${fn:escapeXml(bookitem.name)}</a>
				<big>当前价格:</big><b>￥${bookitem.front_end_ba.currentPrice}</b>
				<br>
				<big>到期时间：</big><b>${bookitem.front_end_ba.endingDate}</b>
			</div>
			<div>
			  <div class = "shopper">
				<small>卖家:</small><small><a href = "#">${fn:escapeXml(bookitem.owner.nickName)}</a></small>
				<small>信誉度：${bookitem.owner.creditPoint}</small>
				<br>
				<small>状态:</small><big><b>正在拍卖</b></big>
			  </div>
			  <div class="botton">
         			 <a href="#"><img src="${staticResources}/image/personalcenter3_05.gif" width="101" height="30" alt=""></a>
        	  </div>
			</div>
		</div>
		</c:forEach>
	</div>
	<div id="page">
    <ul>  
    
      <c:choose>
      <c:when test = "${page.hasPrevious}">
        <li><a href="?curPage=1&pageSize=${page.pageSize}">首页</a></li>
        <li><a  href="?keyword=$curPage=${page.prePage}&pageSize=${page.pageSize}">上一页</a></li>
      </c:when>
      <c:otherwise>
        <li class = "currentpage">已到首页</li>
      </c:otherwise>
      </c:choose>
      <c:if test="${page.currentPage-3 gt 0}">
        <li><a href = "?curPage=${page.currentPage-3}&pageSize=${page.pageSize}">${page.currentPage-3}</a></li>
      </c:if>
      <c:if test="${page.currentPage-2 gt 0}">
        <li><a href = "?curPage=${page.currentPage-2}&pageSize=${page.pageSize}">${page.currentPage-2}</a></li>
      </c:if>
      <c:if test="${page.currentPage-1 gt 0}">
        <li><a href = "?curPage=${page.currentPage-1}&pageSize=${page.pageSize}">${page.currentPage-1}</a></li>
      </c:if>
      
      <li class = "currentpage"><b>${page.currentPage}</b></li>
  
      <c:if test="${page.maxPage - page.currentPage -0 gt 0}">
        <li><a href = "?curPage=${page.currentPage+1}&pageSize=${page.pageSize}">${page.currentPage+1}</a></li>
      </c:if>
      <c:if test="${page.maxPage - page.currentPage -1 gt 0}">
        <li><a href = "?curPage=${page.currentPage+2}&pageSize=${page.pageSize}">${page.currentPage+2}</a></li>
      </c:if>
      <c:if test="${page.maxPage - page.currentPage -2 gt 0}">
        <li><a href = "?curPage=${page.currentPage+3}&pageSize=${page.pageSize}">${page.currentPage+3}</a></li>
      </c:if>
      <c:choose>
      <c:when test = "${page.hasNext}">
        <li><a href="?curPage=${page.nextPage}&pageSize=${page.pageSize}">下一页</a></li>
        <li><a href="?curPage=${page.maxPage}&pageSize=${page.pageSize}">末页</a></li>
      </c:when>
      <c:otherwise>
        <li class = "currentpage">已到末页</li>
      </c:otherwise>
      </c:choose>
    
    </ul>
  </div> 
	
</div>
</body>
</html>